<%--
  Created by IntelliJ IDEA.
  User: zhangkeke
  Date: 2022/10/11
  Time: 18:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>我的账号</title>
    <script src="${pageContext.request.contextPath}/jcript/jquery-1.7.2.js"></script>
    <script>
        $(function (){
            $("td").css({"border":"1px solid black","cellspacing":"0px"})
            $("#sp").mouseover(function (){
                $.ajax({
                    url:"/accountMoney",
                    dataType:"json",
                    success:function (data){
                        $("#sp1").text(data);
                    }
                })
            })
            $("#sp").mouseleave(function (){
                $("#sp1").text("");
            })
        })


    </script>


</head>
<body>
<div>
    <h4>一类账号</h4>
    <span id="sp">我的账号余额(元):</span><span id="sp1" style="color: red"></span>
</div>
<table id="table" >
    <tr>
        <td>卡号</td>
        <td>卡可用余额</td>
    </tr>
    <c:forEach items="${account}" var="card" >
        <tr>
            <td>${card.id_card}</td>
            <td>${card.balance}</td>
        </tr>
    </c:forEach>
</table>
<a href="/pages/userMenu.jsp">返回首页</a>

</body>
</html>
